package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.BusinessNft;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 取币业务记录表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-05-18
 */
public interface BusinessNftMapper extends BaseMapper<BusinessNft> {

    BusinessNft getInfoLast();

    void updateStatus(@Param("businessNftId") Long businessNftId ,@Param("status") Integer status, @Param("reason") String reason);

    void updateStatusBatchById(@Param("ids") List<Long> ids, @Param("status") Integer status);

    List<BusinessNft> getInfoList(@Param("num") Integer num);

    /**
     * 条件按查询，分页获取取币业务列表
     *
     * @param page        分页参数
     * @param businessNft 查询条件
     * @return 分页取币业务列表
     */
    IPage<BusinessNft> getBusinessNftPage(PageParam<BusinessNft> page, @Param("businessNft") BusinessNft businessNft);
}
